package com.cskaoyan.bean.vo;

import com.cskaoyan.bean.po.MarketTopic;
import lombok.Data;
import org.springframework.beans.BeanUtils;

import java.math.BigDecimal;
import java.util.ArrayList;
import java.util.Date;
import java.util.List;

@Data
public class AdminTopicListVo {
    /**
     * total : 4
     * pages : 1
     * limit : 20
     * page : 1
     * list : [{"picUrl":"http://182.92.235.201:8083/wx/storage/fetch/9x1zkc9wae2aauo0rpym.jpg","deleted":false,"addTime":"2022-09-07 23:09:54","price":100,"subtitle":"456","sortOrder":100,"goods":[1181008],"updateTime":"2022-09-07 23:09:54","id":330,"title":"123","readCount":"898","content":"<p>sdfs<\/p>"},{"picUrl":"","deleted":false,"addTime":"2022-09-07 22:06:44","price":333,"subtitle":"2","sortOrder":100,"goods":[],"updateTime":"2022-09-07 22:08:30","id":327,"title":"2","readCount":"1k","content":"<p>222222<\/p>"},{"picUrl":"https://yanxuan.nosdn.127.net/14942996754171334.jpg","deleted":false,"addTime":"2018-02-01 00:00:00","price":59.9,"subtitle":"这些就是他们想要的礼物清单","sortOrder":0,"goods":[1023003,1097011,1097016,1030001,1030002],"updateTime":"2022-09-07 21:40:22","id":313,"title":"一次解决5个节日送礼难题","readCount":"7.8k","content":"<img src=\"//yanxuan.nosdn.127.net/75c55a13fde5eb2bc2dd6813b4c565cc.jpg\">\n    <img src=\"//yanxuan.nosdn.127.net/e27e1de2b271a28a21c10213b9df7e95.jpg\">\n    <img src=\"//yanxuan.nosdn.127.net/9d413d1d28f753cb19096b533d53418d.jpg\">\n    <img src=\"//yanxuan.nosdn.127.net/64b0f2f350969e9818a3b6c43c217325.jpg\">\n    <img src=\"//yanxuan.nosdn.127.net/a668e6ae7f1fa45565c1eac221787570.jpg\">\n    <img src=\"//yanxuan.nosdn.127.net/0d4004e19728f2707f08f4be79bbc774.jpg\">\n    <img src=\"//yanxuan.nosdn.127.net/79ee021bbe97de7ecda691de6787241f.jpg\">"},{"picUrl":"https://yanxuan.nosdn.127.net/14943267735961674.jpg","deleted":false,"addTime":"2018-02-01 00:00:00","price":0,"subtitle":"专业运动品牌同厂，毛毛虫鞋买二送一","sortOrder":1,"goods":[1011004,1021004],"updateTime":"2022-09-07 21:39:38","id":314,"title":"关爱他成长的每一个足迹","readCount":"6.4k","content":"<img src=\"//yanxuan.nosdn.127.net/75c55a13fde5eb2bc2dd6813b4c565cc.jpg\">\n    <img src=\"//yanxuan.nosdn.127.net/e27e1de2b271a28a21c10213b9df7e95.jpg\">\n    <img src=\"//yanxuan.nosdn.127.net/9d413d1d28f753cb19096b533d53418d.jpg\">\n    <img src=\"//yanxuan.nosdn.127.net/64b0f2f350969e9818a3b6c43c217325.jpg\">\n    <img src=\"//yanxuan.nosdn.127.net/a668e6ae7f1fa45565c1eac221787570.jpg\">\n    <img src=\"//yanxuan.nosdn.127.net/0d4004e19728f2707f08f4be79bbc774.jpg\">\n    <img src=\"//yanxuan.nosdn.127.net/79ee021bbe97de7ecda691de6787241f.jpg\">"}]
     */
    private int total;
    private int pages;
    private int limit;
    private int page;
    private List<ListEntity> list = new ArrayList<>();

    public void setListEntity(MarketTopic marketTopic){
        ListEntity listEntity = new ListEntity();
        BeanUtils.copyProperties(marketTopic,listEntity);
        list.add(listEntity);
    }


    @Data
    public class ListEntity {
        /**
         * picUrl : http://182.92.235.201:8083/wx/storage/fetch/9x1zkc9wae2aauo0rpym.jpg
         * deleted : false
         * addTime : 2022-09-07 23:09:54
         * price : 100.0
         * subtitle : 456
         * sortOrder : 100
         * goods : [1181008]
         * updateTime : 2022-09-07 23:09:54
         * id : 330
         * title : 123
         * readCount : 898
         * content : <p>sdfs</p>
         */
        private String picUrl;
        private boolean deleted;
        private Date addTime;
        private BigDecimal price;
        private String subtitle;
        private Integer sortOrder;
        private Integer[] goods;
        private Date updateTime;
        private Integer id;
        private String title;
        private String readCount;
        private String content;

    }
}
